﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PledgeForm.ascx.cs" Inherits="PledgeForm" %>
<%@ Register TagPrefix="csd" TagName="ClientSelectionControl" Src="~/Controls/ClientSelectionControl.ascx" %>
<%@ Register TagPrefix="ajax" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit"%>

<asp:Button runat="server" ID="hiddenTargetControl" Style="display: none" />
<ajax:ModalPopupExtender 
    runat="server" 
    ID="modalPopup" 
    TargetControlID="hiddenTargetControl" 
    PopupControlID="programmaticPopup"
    DropShadow="True" 
    PopupDragHandleControlID="programmaticPopupDragHandle"
    CancelControlID="cancelButton"
    RepositionMode="RepositionOnWindowScroll">
</ajax:ModalPopupExtender>

<asp:Panel runat="server" ID="programmaticPopup" Width="820px"  Style=" background-color: white; border: 1px solid Gray; display: none;" >
    <div runat="server" ID="programmaticPopupDragHandle" style="border: 1px solid black; text-align:center; font-size:15pt; background-color:Lime; text-transform:uppercase; cursor: move; " >
          <b> <asp:Label ID="WindowTitleLabel" runat="server" Text="INTRODUCEREA NOULUI GAJ"></asp:Label> </b>
    </div>        
    <asp:UpdatePanel runat="server" ID="loanSelectionDialogUpdatePanel" >
        <ContentTemplate>   
            <div class="table" style="width:100%; padding:5px;">
                <div class="row">
                    <div class="cell" style="width:50%">
                        Denumirea gajului <br />
                        <asp:TextBox ID="pledgeNameTextBox" runat="server" Width="95%"></asp:TextBox>
                    </div>
                    <div class="cell" style="width:50%">
                        Tipul Gajuliu <br />
                        <asp:DropDownList ID="pledgeTypeDDL" runat="server" AutoPostBack="true" OnSelectedIndexChanged="pledgeTypeDDL_SelectedIndexChanged"></asp:DropDownList>
                        <asp:HiddenField ID="selectedPledgeTextValue" runat="server" />
                    </div>
                </div>    
                <div class="row">
                    <div class="cell" style="width:50%">
                        Proprietarul <br />
                        <asp:TextBox ID="proprietarPledgeDescriptionTextBox" runat="server" Width="86%"></asp:TextBox>
                        <asp:Button ID="clientSelectButton" runat="server" OnClick="clientSelectButton_Clik" Text="+" CausesValidation="false" />
                        <csd:ClientSelectionControl ID="clientFilter" runat="server" AllowMultiSelection="false" TitleWindow="CONTRAGENTII EXISTENTI" ParameterX="20" ParameterY="20" OnOnClientSelected="clientFilter_ClientSelected" />
                        <asp:HiddenField ID="selectedPledjeClientIDHiddenField" runat="server" />
                        <asp:HiddenField ID="selectedGajDescriptionHiddenField" runat="server" />
                    </div>
                    <div class="cell" style="width:50%">
                        Adresa unde este situat gajul<br />
                        <asp:TextBox ID="pledgeAddressTextBox" runat="server" Width="95%"></asp:TextBox>
                    </div>
                </div>   
                <div class="row">
                    <div class="cell" style="width:50%">
                        Pretul de piata <asp:TextBox ID="pledgeMarketPrice"  runat="server"></asp:TextBox>
                        <br /><br />
                        Suma gajata <asp:TextBox ID="pledgetAmountTextBox"  runat="server"></asp:TextBox>
                    </div>      
                    <div class="cell" style="width:50%">
                        Descrierea Gajului
                        <asp:TextBox ID="pledgeDescription" runat="server" TextMode="MultiLine" Width="95%" Height="80px"></asp:TextBox>      
                    </div>    
                </div>                                        
            </div>           

        </ContentTemplate>
    </asp:UpdatePanel>    

    <div style="text-align:center;">
        <asp:HiddenField ID="currentOperationIDHiddenField" runat="server" />
        <%--<asp:HiddenField ID="currentPledgeIDHiddenField" runat="server" />--%>
        <asp:Button ID="okButton" runat="server" Text="Ok" onclick="okButton_Click" Width="100px" CausesValidation="false" />
        <asp:Button ID="cancelButton" runat="server" Text="Cancel" Width="100px" />
    </div>

</asp:Panel>
